package com.bes.opslink.aiops.commons.dto.base;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class R<T> extends BaseDTO{
    /**
     * 成功的默认值
     */
    public static final Integer SUCCESS_CODE = 0;

    /**
     * 失败的默认值
     */
    public static final Integer FAIL_CODE = -1;

    /**
     * 响应编码， 0=成功; 非0异常
     */
    private int code = SUCCESS_CODE;

    /**
     * 响应信息
     */
    private String message;

    /**
     * 响应报文
     */
    private T data;
}
